package com.my.ads.lib.live.account;

import android.accounts.Account;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.Context;
import android.content.Intent;
import android.content.SyncResult;
import android.os.Bundle;

import com.my.ads.lib.service.KeepService;

/**
 * Created by xuanyang on 2018/3/9.
 */

public class SyncAdapter extends AbstractThreadedSyncAdapter {

    private Context mContext;
    @Override
    public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {
        Intent intent =new Intent(mContext, KeepService.class);
        mContext.startService(intent);
    }
    public SyncAdapter(Context context, boolean autoInitialize) {
        super(context, autoInitialize);
        this.mContext = context;
    }


}
